<?php

namespace App\Service;

use App\Models\AiCharacterImageModel;
use App\Models\AiCharacterModel;

class AiCharacterService
{
    public function pageList($page = 1, $pageSize = 10, $categoryId = null, $keyword = '')
    {
        return AiCharacterModel::getListPage($page, $pageSize, $categoryId, $keyword);
    }

    public function detail($id)
    {
        $detail = AiCharacterModel::getById($id);
        if (empty($detail)) {
            return null;
        }
        return $detail;
    }

    public function images($id)
    {
        $images = AiCharacterImageModel::getByCharacterId($id);
        return $images;
    }
}
